package com.epam.tcs.actions;

import java.util.LinkedList;
import java.util.List;

public class Paging {
	public static final int COUNT = 10;
	
	public static List<PageElement> getPageElements(int total, String url_prefix) {
		int page = 0;
		
		List<PageElement> pages = new LinkedList<PageElement>();
		
		for (int i = 0; i < total; i += COUNT) {
			page = i/COUNT + 1;
			pages.add(new PageElement(page, "" + url_prefix + "?page=" + page));
		}	
		return pages;
	}
}
